package com.ssm.controller;


import com.fasterxml.jackson.databind.Module;
import com.ssm.pojo.AirPlane;
import com.ssm.service.AirPlaneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
public class AirPlaneApi {


    @Autowired
    private AirPlaneService airPlaneService;

    @RequestMapping("/find")
    public String find(String id, Model model){
        List<AirPlane> byId = airPlaneService.findById(id);
        model.addAttribute("list",byId);
        return "list";
    }
}
